<template>
    <div>
        
    <van-row>
        <van-col span="24" class="back" ><heads/></van-col>
        <van-col span="6" class="back"><left/></van-col>
        <van-col span="18" class="back"><van-uploader :after-read="upload" /></van-col>
    </van-row>
        
    </div>
</template>

<script>
import axios from 'axios'
import heads from '../components/heads'
import left from '../components/left'

    export default {
        components:{
            'left':left,
            'heads':heads     
     },
     data(){
         return{

         }
     },
     methods:{
         upload(file){
                 let formdata = new FormData()
                 formdata.append('file',file.file)
                 axios({url:'upload',method:'post',data:formdata}).then(res=>{
                     console.log(res)
                 })
             }
         }
     }
    
</script>

<style scoped>

</style>